import { http } from "@/utils/http.js";

// 库存
export const appPurchaseQuery = (data) => {
  return http.request({
    method: "post",
    url: "app/purchase/query",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const appReceive = (data) => {
  return http.request({
    method: "post",
    url: "app/receive",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const getAppReceive = (data) => {
  return http.request({
    method: "GET",
    url: "app/receive",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};
export const appReceivePurchase = (data) => {
  return http.request({
    method: "GET",
    url: "app/purchase",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const appReceiveQuery = (data) => {
  return http.request({
    method: "GET",
    url: "app/receive/query",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const appSelectorAll = (data) => {
  return http.request({
    method: "GET",
    url: "app/storeCenter/selector/all",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const purchaseCount = (data) => {
  return http.request({
    method: "get",
    url: "app/purchase/count",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const purchaseLogistics = (data) => {
  return http.request({
    method: "get",
    url: "app/purchase/logistics",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};
